package com.study.crud.model.emp;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@TableName("emp")
public class Emp implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "eid", type = IdType.AUTO)
    private Integer eid;

    /**
     * 部门名称
     * */
    @TableField("ename")
    private String ename;

    /**
     * 部门建立时间
     * */
    @TableField("createTime")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    public Emp() {
    }

    public Emp(Integer eid, String ename, Date createTime) {
        this.eid = eid;
        this.ename = ename;
        this.createTime = createTime;
    }

    public Integer getEid() {
        return eid;
    }

    public void setEid(Integer eid) {
        this.eid = eid;
    }

    public String getEname() {
        return ename;
    }

    public void setEname(String ename) {
        this.ename = ename;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
